import React, {Component, Fragment} from 'react'
import { Alert } from 'antd';

class toItem extends Component {
    constructor(props){
        super(props)
        this.removeData = this.removeData.bind(this)
    }
    
    removeData(){
        const  {deletData, index} = this.props
        deletData(index)
    }

    render(){
        const  {content} = this.props
        return (
            <Fragment>
                <li onClick={this.removeData}><Alert message={content} type="success" /></li>
                <br/>
            </Fragment>
        )
    }
}

export default toItem